#!/usr/bin/env python3
# -*- coding:UTF-8 -*-

from execption.MyException import MyException
from execption.ResultCodeEnum import ErrorCodeEnum


# 异常测试
def test_exception():
    try:
        print('执行代码')
        raise MyException(ErrorCodeEnum.FORBIDDEN)
    except MyException as e:
        print(e)
        return
    except Exception as e:
        print(e)
        print('系统内部异常', e)
    finally:
        print('无论异常是否发生都会执行')
